An operating system for a multiprocessor environment can have several processes that are common code elements used by all processors. Similarly, several processes may share common data sets used by all processor. In a multiprocessor system having a “write-into-cache” architecture, gatewords are used in a software controlled process to prevent more than one processor from executing common code or accessing shared data at the same time. A unique gateword that is assigned to a given process or data set is tested to assure that no other processor is currently executing or accessing the information a given processor is requesting. This procedure prevents a detrimental activity from occurring when a processor changes data at the same time another processor is using it.
In a write-into-cache architecture, the gateword for given code or data is siphoned from one processor to another while testing for the gateword to be OPENed (made available). This requires data siphoning between caches. The siphoning process introduces significant delays when the copied data must be siphoned through multiple levels of cache. Thus, in modern multiprocessing systems, not all processors are equal when it comes to data siphoning delays. The more cache mechanisms a given gateword must pass through, the longer it will take the gateword to arrive at the requesting processor.
A process decision cannot be made until a siphoned gateword arrives and can be tested by a processor seeking access to the code/data guarded by the gatword. The delays can be sufficiently excessive as to prevent a processor with long siphon delays in a given condition from timely acquiring the relevant gateword before another processor has overwritten (and thus CLOSEd) it. This undesirable result is commonly called “hogging”.
Different schemes to work around the hogging problem use software delays before the gateword is retested, but these delays are made without any assurance that a processor board (carrying a plurality of CPUs) that currently retains the gateword will relinquish access to a CPU on another, “gateword-starved”, board. Other schemes use interrupts to broadcast the identity of the processor board that currently has control of the gateword so that CPUs on the same board will detect this and then delay longer, giving CPUs on another board (gateword starved board) a chance to access the gateword. Still other mechanisms use a dedicated processor to maintain a gateword queue, while yet other systems devote hardware in the form of FIFO arrays or fast logic across board boundaries in attempts to create equal access in a multiprocessor environment.
Software systems have typically relied on hardware to mediate the gateword access controls using a read-alter-rewrite method of access. Specific gate handling instructions used this mechanism which was satisfactory when processors in a multiprocessor system had substantially the same access times within the context of processor clock speeds. But, as hardware designs became more complex and processor speeds increased, it also became more difficult to attain the interface speeds necessary to handle the gateword access priority without a system performance penalty. The responsibility for access to heavily used gatewords has gradually become more dependent on software mechanisms as software designers become increasingly aware of the problems that can occur as a result of the hogging effect.
Most software techniques employed to handle the hogging problem are of fixed delay types that will always delay access to a gateword whether a delay is required or not. Fixed delay techniques significantly reduce system performance, and this type of software technique must be tuned to the system architecture and may even have to be tuned to various gates within the operating system.
One highly effective solution (essentially different from the solution provided by the present invention) for the hogging problem is disclosed and claimed in our copending application application Ser. No. 10/219,644, filed Aug. 15, 2002, and entitled: “Gateword Acquisition in a Multiprocessor Write-Into-Cache Environment”. The solution set forth in that application, however, requires the creation of at least one, and typically two, new operating system instructions. This requirement has certain potential drawbacks. Programmers must be informed about and understand the use of the new commands. Legacy software must be revised to include the command(s) in order to enjoy the anti-hogging benefits. There may not be sufficient unused operation codes in the instruction set, or even in the hardware, to accommodate the new instructions.
Accordingly, it would be highly desirable to provide hardware assistance in effecting software handling of gateword control in a complex multiple processor system with a write-into-cache architecture without the need to add new instructions to the operating system repertoire. The present invention achieves this objective.